package org.chen.ly.feign.fallback;

import lombok.extern.slf4j.Slf4j;
import org.chen.common.result.ResultVO;
import org.chen.common.system.province.ProvinceCapital;
import org.chen.ly.feign.SystemClient;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SystemFeignFallback implements SystemClient {

    @Override
    public ResultVO<ProvinceCapital> getSceneCityIdByName(String name) {
        ProvinceCapital provinceCapital = new ProvinceCapital();
        provinceCapital.setCtripCityId(28L);
        provinceCapital.setProvince("四川省");
        provinceCapital.setName("成都市");
        log.info("Fallback: Returning default city ID for name: {}, 使用兜底数据", name);
        return ResultVO.success(provinceCapital);
    }
}
